package com.ws.wsdemo2.server;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


/**
 * @Classname PushQuoteThread
 * @Description TODO
 * @Date 2019/5/9 12:48
 * @Created by Administrator
 */
@Component
public class PushQuoteThread implements Runnable{
    @Autowired
    WebSocketServer webSocketServer;
    @Autowired SubThread subThread;
    @Override
    public void run() {
        while(true){
            try {
                webSocketServer.sendInfos("ws_test");
                /*new Thread(subThread).start();*/
                Thread.sleep(1000);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
